package com.sne.sys.entity;

import com.sne.common.entity.BaseModel;
import com.sne.common.validated.Insert;
import com.sne.common.validated.Login;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 用户
 * </p>
 *
 * @author fanghh
 * @since 2020-01-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SysUser对象", description = "用户")
public class SysUser extends BaseModel<SysUser> {

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @NotBlank(groups = {Insert.class, Login.class}, message = "用户名不能为空")
    @ApiModelProperty(value = "用户名")
    private String userName;

    @NotBlank(groups = {Insert.class, Login.class}, message = "密码不能为空")
    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "手机")
    private String phone;

    @ApiModelProperty(value = "状态")
    private Boolean state;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "个人介绍")
    private String introduction;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "性别")
    private String sex;

}
